@import "../base/util/scss_function";
html,
body{
    height: 100%;
    width: 100%;
    overflow: hidden;
}
textarea, input, button, select {
    outline: none;
    resize: none;
    border: none;
    background: none;
    -webkit-appearance: none;
}
img{
    pointer-events: none;
}
.header{
    @include clearfix-row();
    height:52px;
    line-height:52px;
    background-color: #ff7e00;
    color: #fff;
    position: relative;
    text-align: center;
    & .title{
        position: absolute;
        top: 0px;
        left: 94px;
        right: 62px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    & .button{
        position: relative;
        z-index:2;
        & .edit-choose-img {
            position: absolute;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
        }
    }
}
.content-edit{
    position: fixed;
    top:52px;
    bottom: 140px;
    left:0;
    right: 0;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    display: flex;
    & .edit-mask-fix{
        @include transform(translate(-50%,-50%));
        max-height: 90%;
        max-width: 90%;
        position: absolute;
        left: 50%;
        top: 50%;
    }
    & .edit-box {
        position: relative;
        max-width: 400px;
        margin: 0 auto;
        overflow: hidden;
        & .edit-mask {
            position: relative;
            z-index: 10;
        }
        & .edit {
            position: absolute;
            overflow: hidden;
            & .edit-item {
                position: absolute;
                top: 0;
                right: 0;
                bottom: 0;
                left: 0;
                pointer-events: none;
                & .user-image {
                    position: absolute;
                    left: 0;
                    top: 0;
                    -webkit-transform: translate3d(0, 0, 0);
                    transform: translate3d(0, 0, 0);
                }
            }
            & .chartlet-item {
                position: absolute;
                left: 25%;
                top: 50%;
                width: 50%;
                margin-top: -25%;
                -webkit-transform: translate3d(0, 0, 0);
                transform: translate3d(0, 0, 0);
                border: 1px dashed transparent;
                pointer-events: auto;
                & .chartlet-del {
                    position: absolute;
                    right: 0;
                    top: 0;
                    z-index: 20;
                    padding: .05rem;
                    margin: -.75rem -.75rem 0 0;
                    font-size: .16rem;
                    color: #fff;
                    visibility: hidden;
                    pointer-events: auto;
                    &  i {
                        display: block;
                        width: 1.7em;
                        height: 1.7em;
                        line-height: 1.7em;
                        background-color: #CD0000;
                        border-radius: 50%;
                        color: #fff;
                        text-align: center;
                        font-size: 12px;
                    }
                }
                &.active {
                    z-index: 1;
                    border-color: #CD0000;
                    & .chartlet-del {
                        visibility: visible;
                    }
                }
            }
        }
    }
}
.edit-bottom{
    position: fixed;
    bottom: 0;
    left:0;
    right:0;
    height: 140px;
    background-color: #fff;
    box-shadow: 0 0 8px rgba(0,0,0,0.5);
    & .edit-option{
        position: absolute;
        bottom: 0;
        left:0;
        right: 0;
        border-top: 1px solid #ff7e00;
        & .tab-item{
            @include transition(.3s);
            font-size: 12px;
            text-align: center;
            line-height: 35px;
            float: left;
            color: #141414;
            &.active{
                color: #fff;
                background-color: #ff7e00;
            }
        }
    }
    & .edit-material-box{
        position: absolute;
        top:0;
        left:0;
        right:0;
        bottom: 36px;
        & .tab-item{
            position: absolute;
            left:0;
            top:0;
            width: 100%;
            height: 100%;
            & .check-nav-tap {
                position: absolute;
                left: 0;
                top: 0;
                width: 100%;
                line-height: 30px;
                white-space: nowrap;
                overflow-x: auto;
                overflow-y: hidden;
                font-size: 0;
                & > li {
                    @include scrolling-touch();
                    display: inline-block;
                    padding: 0 10px;
                    position: relative;
                    font-size: 12px;
                    &:after{
                        @include transition(.3s);
                        position: absolute;
                        content: '';
                        top:0;
                        left:0;
                        width: 100%;
                        display: none;
                        height:2px;
                        background-color: #ff7e00;
                    }
                    &.active{
                        &:after{
                            display: block;
                        }
                    }
                }
            }
            & .check-nav-list{
                position: absolute;
                left: 0;
                top: 30px;
                bottom: 0;
                width: 100%;
                & .list{
                    @include scrolling-touch();
                    position: absolute;
                    left: 0;
                    top: 0px;
                    bottom: 0;
                    width: 100%;
                    overflow-y: hidden;
                    overflow-x: auto;
                    white-space: nowrap;
                    & .tab{
                        width: 60px;
                        height: 65px;
                        border: 1px solid #333;
                        position: relative;
                        margin-left: 10px;
                        border-radius: 3px;
                        overflow: hidden;
                        display: inline-block;
                        background-repeat: no-repeat;
                        background-position: center;
                        background-size: contain;
                        & .tip{
                            position: absolute;
                            bottom: 0;
                            left: -1px;
                            right: -1px;
                            text-align: center;
                            line-height: 20px;
                            background-color: #a7a7a7;
                            color: #fff;
                            font-size: 12px;
                        }
                        &.active{
                            border-color: #ff7e00;
                        }
                        &:last-child{
                            margin-right: 10px;
                        }
                        &.null{
                            border-color: #a7a7a7;
                        }
                    }
                }
            }
        }
    }
}
.edit-btn {
    width: 40px;
    height: 40px;
    font-size: 14px;
    color: #eee;
    text-align: center;
    background-color: rgba(0,0,0,0.5);
    border-radius: 3px;
    border: 0;
    left: 10px;
    bottom: 150px;
    position: absolute;
    z-index: 10;
    white-space: nowrap;
    text-indent: 0;
    padding: 0;
}
.edit-text-box {
    position: absolute;
    top: 52px;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 999;
    display: none;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.5);
    & .edit-text-content {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280px;
        -webkit-transition: -webkit-transform .4s;
        transition: transform .4s;
        -webkit-transform: translate3d(100%, 0, 0);
        transform: translate3d(100%, 0, 0);
        background-color: #FFF;
        & .btn {
            position: absolute;
            left: 10px;
            right: 10px;
            bottom: 10px;
            display: block;
            font-size: 14px;
            color: #FFF;
            line-height: 44px;
            text-align: center;
            background-color: #1D8AFF;
            border: 1px solid #1D8AFF;
            border-radius: 3px;
            & ~ .edit-text-scroll {
                bottom: 65px;
            }
        }
        & .content-block {
            margin: 15px;
            & .buttons-tab{
                display: -webkit-box;
                display: -webkit-flex;
                display: flex;
                & a {
                    position: relative;
                    display: block;
                    -webkit-box-flex: 1;
                    -webkit-flex: 1;
                    flex: 1;
                    margin-left: -1px;
                    font-size: 12px;
                    color: #1D8AFF;
                    line-height: 30px;
                    text-align: center;
                    border: 1px solid #1D8AFF;
                    &:first-child {
                        margin-left: 0;
                        border-radius: 6px 0 0 6px;
                    }
                    &:last-child {
                        border-radius: 0 6px 6px 0;
                    }
                    &.active {
                        color: #FFF;
                        background-color: #1D8AFF;
                    }
                }
            }
        }
        & .edit-text-scroll {
            position: absolute;
            top: 60px;
            right: 10px;
            bottom: 0px;
            left: 10px;
            overflow-x: hidden;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            & .edit-textarea {
                width: 100%;
                padding: 10px;
                font-size: 14px;
                color: #555;
                border: 1px solid #DDD;
                border-radius: 2px;
                box-sizing: border-box;
            }
            & .edit-text-font {
                & li {
                    padding: 10px 5px;
                    border: 1px solid transparent;
                    &.active {
                        background-color: rgba(29, 138, 255, 0.2);
                    }
                }
            }
            & .edit-text-color {
                padding-left: 1px;
                margin-right: -6px;
                & li {
                    position: relative;
                    float: left;
                    width: 16.66%;
                    padding-top: 15%;
                    background-color: #444;
                    background-clip: padding-box;
                    border: 1px solid #DDD;
                    box-sizing: border-box;
                    margin: -1px 0 0 -1px;
                    &.active:after {
                        content: "\e611";
                        position: absolute;
                        top: 50%;
                        left: 50%;
                        margin: -8px 0 0 -8px;
                        font-size: 16px;
                        color: #FFF;
                        text-shadow: 0 0 3px rgba(0,0,0,0.5);
                        font-family: "iconfont" !important;
                        font-style: normal;
                        line-height: 20px;
                        -webkit-font-smoothing: antialiased;
                        -moz-osx-font-smoothing: grayscale;
                    }
                }
            }
            & .text-direction {
                padding: 10px 0 15px;
                font-size: 12px;
                color: #555;
                line-height: 25px;
                & input {
                    display: none;
                    &:checked + label {
                        color: #FFF;
                        background-color: #1D8AFF;
                    }
                }
                & label {
                    display: inline-block;
                    padding: 0 10px;
                    margin-left: 8px;
                    vertical-align: top;
                    border-radius: 2px;
                }
            }
        }
    }
    &.active {
        display: block;
        & .edit-text-content {
            -webkit-transition-duration: 0.6s;
            transition-duration: 0.6s;
        }
    }
    &.effect {
        & .edit-text-content {
            -webkit-transform: translate3d(0, 0, 0);
            transform: translate3d(0, 0, 0);
        }
    }
}

/*########## 指引 ##########*/
.guide-box {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1000;
    display: none;
    width: 100%;
    height: 100%;
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.8);
    -webkit-transition: opacity 0.6s;
    transition: opacity 0.6s;
    & .guide-tips {
        position: absolute;
        padding: .5em .8em;
        font-size: 14px;
        color: #FFF;
        border-radius: 4px;
        opacity: 0;
        -webkit-transition: opacity 0.6s;
        transition: opacity 0.6s;
        &:nth-child(1) {
            top: 13px;
            left: 65px;
        }
        &:nth-child(2) {
            bottom: 100px;
            left: 45px;
        }
        &:nth-child(3) {
            bottom: 10px;
            left: 30px;
        }
        &:nth-child(4) {
            top: 290px;
            right: 17px;
        }
        &:nth-child(5) {
            top: 12px;
            right: 40px;
        }
    }
    & .fadeIn {
        &:nth-child(1) {
            -webkit-transition-delay: 0s;
            transition-delay: 0s;
        }
        &:nth-child(2) {
            -webkit-transition-delay: 1s;
            transition-delay: 1s;
        }
        &:nth-child(3) {
            -webkit-transition-delay: 2s;
            transition-delay: 2s;
        }
        &:nth-child(4) {
            -webkit-transition-delay: 3s;
            transition-delay: 3s;
        }
        &:nth-child(5) {
            -webkit-transition-delay: 4s;
            transition-delay: 4s;
        }
    }
    & .guide-next {
        position: absolute;
        left: 50%;
        bottom: 25px;
        margin-left: -35px;
        font-size: 16px;
        color: #FFF;
        line-height: 30px;
        text-align: center;
        opacity: 0;
        -webkit-transform: scale(1.4);
        transform: scale(1.4);
        -webkit-transition-property: -webkit-transform, opacity;
        transition-property: transform, opacity;
        -webkit-transition-duration: 0.6s;
        transition-duration: 0.6s;
        background-color: #1D8AFF;
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 6px;
    }
    &.show {
        display: block;
    }
    &.active {
        & .fadeIn {
            opacity: 1;
        }
        & .guide-next {
            -webkit-transform: scale(1);
            transform: scale(1);
        }
    }
    &.hide {
        opacity: 0;
    }
}
.operation-box {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 999;
    width: 100%;
    height: 100%;
    display: none;
    opacity: 0;
    -webkit-transition: opacity 0.6s;
    transition: opacity 0.6s;
    background-color: rgba(0, 0, 0, 0.8);
    & img {
        position: relative;
        top: 40%;
        display: block;
        width: 60%;
        max-width: 400px;
        margin: 0 auto;
    }
    &.show {
        opacity: 1;
    }
}

/*########## 创建订单 ##########*/
.add-order{
    & .counts-add,
    & .counts-minus{
        float: left;
        width: 38px;
        height: 38px;
        line-height: 38px;
        text-align: center;
        border: 1px solid #ddd;
        background-color: #fff;
        font-size: 16px;
        color: #777;
    }
}
